package com.ikcai.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by daxiao on 2016/12/14.
 */
@Controller
@RequestMapping("/hello")
public class HelloWorldController {

    @RequestMapping(method = RequestMethod.POST)
    public String helloWorld(ModelMap model, HttpServletRequest request) {
        String message = "Hello World, Spring 3.0!";
        System.out.println(message);
        model.addAttribute("message", message);
        return "hello";
    }
}
